package com.mhy.pickerview;


import com.contrarywind.interfaces.IPickerViewData;

import java.util.List;

/**
 * @Author : YiYaJing
 * @Data : 2019/9/20 16:49
 * @Class : 地区
 */
public class AreaBean {

    private List<ProvincesBean> provinces;

    public List<ProvincesBean> getProvinces() {
        return provinces;
    }

    public void setProvinces(List<ProvincesBean> provinces) {
        this.provinces = provinces;
    }

    public static class ProvincesBean implements IPickerViewData {
        /**
         * code : 11
         * name : 北京市
         * city : [{"code":"1101","name":"市辖区"}]
         */

        private String code;
        private String name;
        private List<CityBean> city;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<CityBean> getCity() {
            return city;
        }

        public void setCity(List<CityBean> city) {
            this.city = city;
        }

        @Override
        public String getPickerViewText() {
            return this.name;
        }

        public static class CityBean {
            /**
             * code : 1101
             * name : 市辖区
             */

            private String code;
            private String name;

            public String getCode() {
                return code;
            }

            public void setCode(String code) {
                this.code = code;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }
        }
    }
}
